package prototype.autosurfer;

import java.io.File;
import java.util.logging.Logger;

import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;
import org.jsoup.nodes.Document;

import net.m510.autosurfer.common.cli.OutDirOption;
import net.m510.autosurfer.common.cli.PasswordOption;
import net.m510.autosurfer.core.AbstractMain;
import net.m510.autosurfer.core.process.AbstractSurfProcess;
import net.m510.autosurfer.core.process.SurfProcess;

public class ProtoMain2 extends AbstractMain {

//	@Override
//	protected void go() throws Exception {
//		// build process chain
//		SurfProcess root = new RootProcess(client,context);
//		AbstractSurfProcess next = new NextProcess(client,context);
//		root.addNext(next);
//		root.process(null);
//	}

	@SuppressWarnings("static-access")
	@Override
	protected Options getOptions() {
		Options options = new Options();
		Option out = new OutDirOption(false);options.addOption(out);
		options.addOption(OptionBuilder.hasArg(true).withArgName("login id")
				.isRequired(true).withDescription("ログインID")
				.create("id"));
		Option password = new PasswordOption(true); options.addOption(password);
		return options;
	}

	@Override
	protected void setParams(CommandLine cmd) {
		// TODO Auto-generated method stub

	}

	public static void main(String[] args) {
		ProtoMain2 main = new ProtoMain2();
		main.setLogger(Logger.getLogger(ProtoMain2.class.getName()));
		main.Main(args);
	}

	protected ProcessFactory getProcessFactory() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected Document start() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected Document login(Document doc) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected Document prepareDownload(Document doc) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected File download(Document doc) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected void logout(Document doc) {
		// TODO Auto-generated method stub
		
	}
}
